﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<div id="dlg" class="easyui-dialog" style="width: 80%; height: 210px; min-width: 240px; max-width: 480px; padding: 9px;"
    data-options="title:'贵州文化演艺集团网站管理',iconCls:'icon-home',minimizable:false,closable:false,resizable:false,
    href:'../html/App/login-form.html',toolbar:'#dlg-toolbar',buttons:'#dlg-buttons',onResize:function(){$(this).dialog('center');}">
</div>
<div id="dlg-buttons" style="text-align: center;">
    <h4>欢迎使用：
        <a target="_blank" href="/Super/">系统管理员</a>
        <a target="_blank" href="/Staff/">内部员工</a>
        <!-- <a target="_blank" href="/Member/">成员【C】</a>
        <a target="_blank" href="/Vip/">成员【T】</a>
        <a target="_blank" href="/Biz/">商城</a>
        <a target="_blank" href="/User/">社交</a> -->
    </h4>
</div>
<div id="dlg-toolbar" style="padding: 2px 0;">
    <table style="width: 100%">
        <tr>
            <td style="padding-left: 2px">
                <a href="javascript:void(0)" class="easyui-linkbutton" id="login" data-options="iconCls:'icon-man',plain:true,">登录</a>
                <a href="javascript:void(0)" class="easyui-linkbutton" id="exit" data-options="iconCls:'icon-man',plain:true," onclick="$('#frm').form('submit');" style="display: none;">退出</a>
            </td>
            <td style="text-align: right; padding-right: 2px">
                <a id="skin" href="javascript:void(0)" class="easyui-menubutton" data-options="iconCls:'icon-skin',border:false,plain:true,menu:'#mm-skin',">换肤</a>
                <a href="javascript:void(0)" class="easyui-linkbutton" id="close" data-options="iconCls:'icon-no',plain:true," onclick="javascript:$('#dlg').dialog('close');">关闭</a>
                <span style="display: none;"><input class="easyui-searchbox" id="seek" data-options="prompt:'搜索新闻'" style="width: 100px;" /></span>
                <div id="mm-skin" class="easyui-menu" style="display: none; width: 100px;">
                    <div>Default</div>
                    <div>Gray</div>
                    <div>Metro</div>
                    <div>Bootstrap</div>
                    <div>Black</div>
                    <div class="menu-sep"></div>
                    <div>Metro-Blue</div>
                    <div>Metro-Gray</div>
                    <div>Metro-Green</div>
                    <div>Metro-Orange</div>
                    <div>Metro-Red</div>
                    <div class="menu-sep"></div>
                    <div>ui-Cupertino</div>
                    <div>ui-Dark-Hive</div>
                    <div>ui-Pepper-Grinder</div>
                    <div>ui-Sunny</div>
                </div>
            </td>
        </tr>
    </table>
</div>
<script type="text/javascript">
    (function ($) {
        window.xbase.logonYes(); // 访问本页面，如已登录则跳转到index.html。
        if ($.cookie('themesName')) { window.xbase.theme($.cookie('themesName')); }
        $('#mm-skin').menu({ onClick: function (item) { window.xbase.theme(item.text); } });
        // $.messager.alert('错误提示', '.test.', 'error');
        // alert('width:' + window.screen.width + ' height:' + window.screen.height);
        // 1.登录检测。【已登录，则自动进入】
        $.ajax({
            type: 'GET',
            url: '/ashx/App/LoginCheck.ashx',
            data: 'url=' + window.location.pathname + '&rnd=' + Math.random(),
            success: function (result) {
                var json = window.xbase.json(result);
                if (json.error == 0) window.location.href = './?' + Math.random();
            },
        });
        // 2.登录操作。
        $('#login').click(function () {
            if (navigator.userAgent.indexOf('Chrome') == -1 && navigator.userAgent.indexOf('Firefox') == -1) { $.messager.alert('系统错误', '请使用Chrome 或 FireFox浏览器！<hr />当前：' + navigator.userAgent, 'error'); return; }
            $('#frm').form('submit', {
                url: '/ashx/App/Login.ashx?url=' + window.location.pathname + '&rnd=' + Math.random(),
                onSubmit: function () {
                    if (!$(this).form('validate'))
                        return false;
                    else
                        return true;
                },
                success: function(result) {
                    if (result == null || result == '') return window.xbase.return('系统错误', 'Ajax返回空值，请稍后重试！<br />ps:如果您使用了360浏览器，请换之！', 'error');
                    var json = window.xbase.json(result);
                    if (json.error == 0)
                        window.location.href = './?rnd=' + Math.random();
                    else
                        $.messager.alert(json.title, json.message.m_StringValue, json.type);
                    //window.xbase.loadRemote('#ff', '/Ashx/Acc/Staff/AccInfoSale.ashx');
                }
            });
            //$('#frm').submit();
        });
    })(jQuery);
</script>
</body>
</html>
